package com.lengxf.design;

/**
 * 新增具体中介者类
 * By Lengxf
 */
public class SubConcreteMediator extends ConcreteMediator {
    public Label label;

    @Override
    public void componentChanged(Component component) {

        if (component == addButton) {
            System.out.println("--单机增加按钮--");
            list.update();
            comboBox.update();
            textBox.update();
            label.update();
        } else if (component == list) {
            System.out.println("--从列表框选择客户--");
            comboBox.select();
            textBox.setText();
        } else if (component == comboBox) {
            System.out.println("--从组合框选择客户--");
            comboBox.select();
            textBox.setText();
        }

    }
}
